package main

import "fmt"

func fn1() {
	fmt.Println("fn1")
}

func fn2(a, b int) {
	defer func() {
		err := recover()
		if err != nil {
			fmt.Println("error:", err)
		}
	}()
	fmt.Println(a / b)
}

func main() {
	fn1()
	fn2(10, 2)
	fmt.Println("结束")
}
